package com.bugbuff.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bugbuff.common.pojo.Options;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SoulOptionsMapper extends BaseMapper<Options> {
    @Select("select id,qid,context as 'option',score from tb_options where qid=#{id}")
    List<Options> findOptionsById(String id);


    @Select("select id,qid,context as 'option',score from tb_options where qid=#{questionId} and id=#{optionId}")
    Options selectByQuestionIdAndOptionId(String questionId, String optionId);
}
